<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> 
	   	<!--tabellaServiziPubblici.jsp--> 
	   	<fieldset>
		<display:table name="listaServizi" id="s" pagesize="40" export="true" >
			<display:column title="Proprietario" sortable="true" headerScope="col" >
				<c:choose>
				<c:when test="${s.idUserInse == dettaglio.idUser}">
									<span style="background-color: yellow;"><a href="profiloUtente.html?idUser=<c:out value="${s.userInse.idUser}"/>"> <c:out value="${s.userInse.login}"/> </a></span>
				</c:when>
				<c:otherwise>
								<a href="profiloUtente.html?idUser=<c:out value="${s.userInse.idUser}"/>"> <c:out value="${s.userInse.login}"/> </a>
				</c:otherwise>
				</c:choose>
			</display:column>
			<display:column title="DATA" sortable="true" headerScope="col" ><c:out value="${s.data}"/></display:column>
			<display:column title="ORA" sortable="false" headerScope="col"><c:out value="${s.ore}"/>:<c:out value="${s.minuti}"/></display:column>
			<display:column title="PICKUP" sortable="true" headerScope="col">
				<c:choose>
					<c:when test="${dettaglio.idUser == s.idUserInse or dettaglio.idUser == s.idUserExec }">
						<c:out value="${s.pickUp}"/>
					</c:when>
					<c:otherwise>
						<c:out value="${s.pickUpToken}"/>
					</c:otherwise>
				</c:choose>
			</display:column>
		
			<display:column title="DROPOFF" sortable="true" headerScope="col"> 
				<c:choose>
					<c:when test="${dettaglio.idUser == s.idUserInse or dettaglio.idUser == s.idUserExec }">
						<c:out value="${s.dropOff}"/>
					</c:when>
					<c:otherwise>
						<c:out value="${s.dropOffToken}"/>
					</c:otherwise>
				</c:choose>
			</display:column>
			
			 <display:column title="Pax" headerScope="col"><c:out value="${s.pax}"/></display:column>
 			 <display:column title="Pagano" sortable="true" headerScope="col" media="html">
 			 			<c:out value="${s.prezzo}"/>&euro;
 			 </display:column>
 			 <display:column title="Commissione" sortable="true" headerScope="col" media="html">
 			 			<c:out value="${s.commissione}"/>&euro;
 			 </display:column>
 		
 		
<%--   			 <display:column title="STATO" sortable="true" headerScope="col" media="html"> --%>
<%--  			 		<c:choose> --%>
<%--  			 			<c:when test="${s.dataFine == null && idUserExec == 0 }" > --%>
<%-- 	 			 			<img src="<%=request.getContextPath()%>/images/ok.png" alt="SERVIZIO ACQUISIBILE"/> --%>
<%-- 	 			 		</c:when> --%>
<%-- 	 			 		<c:otherwise> --%>
<%-- 	 			 			<img src="<%=request.getContextPath()%>/images/error.png" alt="NON ACQUISIBILE"/> --%>
<%-- 	 			 		</c:otherwise> --%>
<%--  			 		</c:choose> --%>
<%--  			 </display:column> --%>
 			 			
 			 			
			 <display:column title="OPER" headerScope="col" media="html" >
			 		<a href="dettaglioServizio.html?idServ=<c:out value="${s.idServ}" />&caller=<c:out value="${caller}" />" ><img src="<%=request.getContextPath()%>/images/dettaglio.png" alt="DETTAGLIO SERVIZIO"/></a>
			 </display:column>
			 <display:footer media="excel pdf html">
				 <div>
				 <tr style="background-color: silver; color: black; font-size: 0.7em">
					 	<td colspan="12">&nbsp;</td>
		 			 	
	 			 </tr>
 			 	</div>
	 			 
			 </display:footer>
		</display:table>  
		</fieldset> 